/*
 * @FileName: easy_filter.c
 * @Author: GreyQiu qiushaogui@aikosolar.com
 * @Date: 2023-07-18 14:01:16
 * @LastEditors: GreyQiu qiushaogui@aikosolar.com
 * @LastEditTime: 2023-07-20 10:25:59
 * @Description: 
 * 
 * Copyright (c) 2023, All Rights Reserved. 
 */
#include <stdint.h>
#include "easy_filter.h"

/**
 * @description: LPF配置
 * @return 无
 */
void easy_lpf_config_f32(easy_lpf_f32_t * S, float Fc, float Ts)
{
    float Wc = 6.28f * Fc; // 2*pi*Fc
    S->A = Wc * Ts / (1 + Wc * Ts);
    S->B = 1.0f - S->A;
}
